From: Jasper St. Pierre Date: Sun, 27 Apr 2014 15:02:45 +0000 (-0400) Subject: appDisplay: Remove redundant checks for pageNumber X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2512 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=551e57406d322eb290cfc93c032af6a939deee56;p=gnome-shell.git appDisplay: Remove redundant checks for pageNumber We already do these at the beginning of the function. https://bugzilla.gnome.org/show_bug.cgi?id=729064 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index cf570cf73..2596929a4 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -472,14 +472,12 @@ const AllView = new Lang.Class({ // longer than PAGE_SWITCH_TIME time = Math.min(time, PAGE_SWITCH_TIME); - if (pageNumber < this._grid.nPages() && pageNumber >= 0) { - this._currentPage = pageNumber; - Tweener.addTween(this._adjustment, - { value: this._grid.getPageY(this._currentPage), - time: time, - transition: 'easeOutQuad' }); - this._pageIndicators.setCurrentPage(pageNumber); - } + this._currentPage = pageNumber; + Tweener.addTween(this._adjustment, + { value: this._grid.getPageY(this._currentPage), + time: time, + transition: 'easeOutQuad' }); + this._pageIndicators.setCurrentPage(pageNumber); }, _diffToPage: function (pageNumber) {